package com.swpu.zdl.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class TeacherAspect {
//    @Pointcut(value = "execution(* com.swpu.zdl.service.impl.StudentImpl.addAop(..))")
//    public void pro (){}
    @Before("execution(* com.swpu.zdl.mapper.TeacherMapper.*(..))")
    public void before(){
        System.out.println("进行aop面向切面编程的前置通知");
        System.out.println("这是进行操作teachermapper前的操作..........");
    }
    @After("execution(* com.swpu.zdl.mapper.TeacherMapper.*(..))")
    public void after(){
        System.out.println("进行aop面向切面编程的后置通知");
        System.out.println("这是执行完成sql语句之后的各种操作.........");
    }

    
}
